package org.easymis.oa.modules.main.controller;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.easymis.entitys.mybatis.dto.OaMessage;
import org.easymis.oa.service.main.OaMessageMng;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 
 * @个人消息
 *
 */
@Controller
@RequestMapping("/message/")
public class OaMessageAction {
	@Resource
	private OaMessageMng service;
	@RequestMapping(value = "index")
	public String forwardaddressareaIndexJsp(HttpServletRequest request, HttpSession session) throws Exception {
		request.setAttribute("base", "http://demo.easymis.cn");
		return "/message/index";
	}

	@RequestMapping(value = "grid", method = RequestMethod.POST)
	public String forwardList(int page, int rows, HttpServletRequest request) throws Exception {
		OaMessage bean = new OaMessage();
		//bean.setOrgId(orgId);
		List messageList=service.getList(bean);
		request.setAttribute("messageList", messageList);
		return "/message/grid";
	}
}
